package com.my.chapter10;

public class practice9 {
    public static void main(String[] args) {
        Outer9 o = new Outer9();
        A a = o.getInner();
        a.display();
    }
}

interface A{
    void display();
}

class Outer9{
    A getInner(){
        class Inner implements A{

            @Override
            public void display() {
                System.out.println("Inner.display()");
            }
        }
        Inner i = new Inner();
        return i;
    }
}


